var mongoose = require('mongoose'); // 引入的是mongoose
var mongoosePaginate = require('mongoose-paginate');
var Schema = mongoose.Schema; // 利用mongoose下的Schema(架构、模型)
var ObjectId = Schema.ObjectId;

var MusicSchema = new Schema({
    name: String,
    desc: String,
    author: {},//作者
    commentCount: Number,//评论条数
    time: String,//发行时间
    cateId:ObjectId,
    cate: {},
    date: { type: Date, default: Date.now }
});

MusicSchema.plugin(mongoosePaginate);
module.exports = mongoose.model('Music', MusicSchema);